import axios from 'axios'

export default {
    data(data){
        return axios({
            method:"get",
            url: "/category/data?timetamp=" + new Date().getTime(),
            params:{
                parentID:data
            }
        })
    },
    addCategory(data){
        return axios({
            method:"post",
            url: "/category/add?timetamp=" + new Date().getTime(),
            data
        })
    },
    editCategory(data){
        return axios({
            method:"post",
            url: "/category/edit?timetamp=" + new Date().getTime(),
            data
        })
    },
    delCategory(data){
        return axios({
            method:"post",
            url: "/category/del?timetamp=" + new Date().getTime(),
            data
        })
    }
}